home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / tagwri_1 / tagwrite.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-05-28  |  9.2 KB  |  223 lines

  1. VERSION 5.00
  2. Object = "{140E5F52-0F87-11D3-891F-00104B0A340B}#1.0#0"; "TagWriter.ocx"
  3. Begin VB.Form TagWriterDemo1 
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   885
  6.    ClientLeft      =   3375
  7.    ClientTop       =   1890
  8.    ClientWidth     =   1560
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   885
  11.    ScaleWidth      =   1560
  12.    Begin prjTagWriter.TagWriter TagWriter1 
  13.       Left            =   120
  14.       Top             =   120
  15.       _ExtentX        =   873
  16.       _ExtentY        =   873
  17.       Tag_Title       =   "                              "
  18.       Tag_Artist      =   "                              "
  19.       Tag_Album       =   "                              "
  20.       Tag_Year        =   "19  "
  21.       Tag_Comment     =   "                              "
  22.    End
  23. Attribute VB_Name = "TagWriterDemo1"
  24. Attribute VB_GlobalNameSpace = False
  25. Attribute VB_Creatable = False
  26. Attribute VB_PredeclaredId = True
  27. Attribute VB_Exposed = False
  28. Option Explicit
  29. Private Const GENRE_No_GENRE As Byte = 255
  30. Private Const GENRE_Acapella As Byte = 123
  31. Private Const GENRE_Acid As Byte = 34
  32. Private Const GENRE_Acid_Jazz As Byte = 74
  33. Private Const GENRE_Acid_Punk As Byte = 73
  34. Private Const GENRE_Acoustic As Byte = 99
  35. Private Const GENRE_Alternative As Byte = 20
  36. Private Const GENRE_Alternative_Rock As Byte = 40
  37. Private Const GENRE_Ambient As Byte = 26
  38. Private Const GENRE_Anime As Byte = 145
  39. Private Const GENRE_Avantgarde As Byte = 90
  40. Private Const GENRE_Ballad As Byte = 116
  41. Private Const GENRE_Bass As Byte = 41
  42. Private Const GENRE_Beat As Byte = 135
  43. Private Const GENRE_Bebob As Byte = 85
  44. Private Const GENRE_Big_Band As Byte = 96
  45. Private Const GENRE_Black_Metal As Byte = 138
  46. Private Const GENRE_Bluegrass As Byte = 89
  47. Private Const GENRE_Blues As Byte = 0
  48. Private Const GENRE_Booty_Bass As Byte = 107
  49. Private Const GENRE_BritPop As Byte = 132
  50. Private Const GENRE_Cabaret As Byte = 65
  51. Private Const GENRE_Celtic As Byte = 88
  52. Private Const GENRE_Chamber_Music As Byte = 104
  53. Private Const GENRE_Chanson As Byte = 102
  54. Private Const GENRE_Chorus As Byte = 97
  55. Private Const GENRE_Christian_Gangsta_Rap As Byte = 136
  56. Private Const GENRE_Christian_Rap As Byte = 61
  57. Private Const GENRE_Christian_Rock As Byte = 141
  58. Private Const GENRE_Classic_Rock As Byte = 1
  59. Private Const GENRE_Classical As Byte = 32
  60. Private Const GENRE_Club As Byte = 112
  61. Private Const GENRE_Club_House As Byte = 128
  62. Private Const GENRE_Comedy As Byte = 57
  63. Private Const GENRE_Contemporary_Christian As Byte = 140
  64. Private Const GENRE_Country As Byte = 2
  65. Private Const GENRE_Crossover As Byte = 139
  66. Private Const GENRE_Cult As Byte = 58
  67. Private Const GENRE_Dance As Byte = 3
  68. Private Const GENRE_Dance_Hall As Byte = 125
  69. Private Const GENRE_Darkwave As Byte = 50
  70. Private Const GENRE_Death_Metal As Byte = 22
  71. Private Const GENRE_Disco As Byte = 4
  72. Private Const GENRE_Dream As Byte = 55
  73. Private Const GENRE_Drum_n_Bass As Byte = 127
  74. Private Const GENRE_Drum_Solo As Byte = 122
  75. Private Const GENRE_Duet As Byte = 120
  76. Private Const GENRE_Easy_Listening As Byte = 98
  77. Private Const GENRE_Electronic As Byte = 52
  78. Private Const GENRE_Ethnic As Byte = 48
  79. Private Const GENRE_Euro_House As Byte = 124
  80. Private Const GENRE_Euro_Techno As Byte = 25
  81. Private Const GENRE_Eurodance As Byte = 54
  82. Private Const GENRE_Fast_Fusion As Byte = 84
  83. Private Const GENRE_Folk As Byte = 80
  84. Private Const GENRE_Folk_Rock As Byte = 81
  85. Private Const GENRE_Folklore As Byte = 115
  86. Private Const GENRE_Freestyle As Byte = 119
  87. Private Const GENRE_Funk As Byte = 5
  88. Private Const GENRE_Fusion As Byte = 30
  89. Private Const GENRE_Game As Byte = 36
  90. Private Const GENRE_Gangsta As Byte = 59
  91. Private Const GENRE_Goa As Byte = 126
  92. Private Const GENRE_Gospel As Byte = 38
  93. Private Const GENRE_Gothic As Byte = 49
  94. Private Const GENRE_Gothic_Rock As Byte = 91
  95. Private Const GENRE_Grunge As Byte = 6
  96. Private Const GENRE_Hard_Rock As Byte = 79
  97. Private Const GENRE_Hardcore As Byte = 129
  98. Private Const GENRE_Heavy_Metal As Byte = 137
  99. Private Const GENRE_Hip_Hop As Byte = 7
  100. Private Const GENRE_House As Byte = 35
  101. Private Const GENRE_Humour As Byte = 100
  102. Private Const GENRE_Indie As Byte = 131
  103. Private Const GENRE_Industrial As Byte = 19
  104. Private Const GENRE_Instrumental As Byte = 33
  105. Private Const GENRE_Instrumental_Pop As Byte = 46
  106. Private Const GENRE_Instrumental_Rock As Byte = 47
  107. Private Const GENRE_Jazz As Byte = 8
  108. Private Const GENRE_Jazz_Funk As Byte = 29
  109. Private Const GENRE_JPop As Byte = 146
  110. Private Const GENRE_Jungle As Byte = 63
  111. Private Const GENRE_Latin As Byte = 86
  112. Private Const GENRE_Lo_Fi As Byte = 71
  113. Private Const GENRE_Meditative As Byte = 45
  114. Private Const GENRE_Merengue As Byte = 142
  115. Private Const GENRE_Metal As Byte = 9
  116. Private Const GENRE_Musical As Byte = 77
  117. Private Const GENRE_National_Folk As Byte = 82
  118. Private Const GENRE_Native_American As Byte = 64
  119. Private Const GENRE_Negerpunk As Byte = 133
  120. Private Const GENRE_New_Age As Byte = 10
  121. Private Const GENRE_New_Wave As Byte = 66
  122. Private Const GENRE_Noise As Byte = 39
  123. Private Const GENRE_Oldies As Byte = 11
  124. Private Const GENRE_Opera As Byte = 103
  125. Private Const GENRE_Other As Byte = 12
  126. Private Const GENRE_Polka As Byte = 75
  127. Private Const GENRE_Polsk_Punk As Byte = 134
  128. Private Const GENRE_Pop As Byte = 13
  129. Private Const GENRE_Pop_Folk As Byte = 53
  130. Private Const GENRE_Pop_Funk As Byte = 62
  131. Private Const GENRE_Porn_Groove As Byte = 109
  132. Private Const GENRE_Power_Ballad As Byte = 117
  133. Private Const GENRE_Pranks As Byte = 23
  134. Private Const GENRE_Primus As Byte = 108
  135. Private Const GENRE_Progressive_Rock As Byte = 92
  136. Private Const GENRE_Psychadelic As Byte = 67
  137. Private Const GENRE_Psychedelic_Rock As Byte = 93
  138. Private Const GENRE_Punk As Byte = 43
  139. Private Const GENRE_Punk_Rock As Byte = 121
  140. Private Const GENRE_Rap As Byte = 15
  141. Private Const GENRE_Rave As Byte = 68
  142. Private Const GENRE_Reggae As Byte = 16
  143. Private Const GENRE_Retro As Byte = 76
  144. Private Const GENRE_Revival As Byte = 87
  145. Private Const GENRE_Rhythm_n_Blues As Byte = 14
  146. Private Const GENRE_Rhytmic_Soul As Byte = 118
  147. Private Const GENRE_Rock As Byte = 17
  148. Private Const GENRE_Rock_n_Roll As Byte = 78
  149. Private Const GENRE_Salsa As Byte = 143
  150. Private Const GENRE_Samba As Byte = 114
  151. Private Const GENRE_Satire As Byte = 110
  152. Private Const GENRE_ShowTunes As Byte = 69
  153. Private Const GENRE_Ska As Byte = 21
  154. Private Const GENRE_Slow_Jam As Byte = 111
  155. Private Const GENRE_Slow_Rock As Byte = 95
  156. Private Const GENRE_Sonata As Byte = 105
  157. Private Const GENRE_Soul As Byte = 42
  158. Private Const GENRE_Sound_Clip As Byte = 37
  159. Private Const GENRE_Soundtrack As Byte = 24
  160. Private Const GENRE_Southern_Rock As Byte = 56
  161. Private Const GENRE_Space As Byte = 44
  162. Private Const GENRE_Speech As Byte = 101
  163. Private Const GENRE_Swing As Byte = 83
  164. Private Const GENRE_Symphonic_Rock As Byte = 94
  165. Private Const GENRE_Symphony As Byte = 106
  166. Private Const GENRE_SynthPop As Byte = 147
  167. Private Const GENRE_Tango As Byte = 113
  168. Private Const GENRE_Techno As Byte = 18
  169. Private Const GENRE_Techno_Industrial As Byte = 51
  170. Private Const GENRE_Terror As Byte = 130
  171. Private Const GENRE_Top_40 As Byte = 60
  172. Private Const GENRE_Trailer As Byte = 70
  173. Private Const GENRE_Trance As Byte = 31
  174. Private Const GENRE_Trash_Metal As Byte = 144
  175. Private Const GENRE_Tribal As Byte = 72
  176. Private Const GENRE_Trip_Hop As Byte = 27
  177. Private Const GENRE_Vocal As Byte = 28
  178. Private Sub Form_Load()
  179.     Dim l As Long
  180.     Dim mp3File As String
  181.     'store the name of the mp3 file in a string,
  182.     mp3File = "E:\Temp & Config\Temp\bla4.mp3" 'App.Path + "\TagWriterDemo.mp3"
  183.     Me.Show
  184.     With TagWriter1
  185.         .MP3_FileName = mp3File 'read the file's ID3 tag, if any, otherwise get default values
  186.         
  187.         'show the existing tag
  188.         Debug.Print .ID3tag_Album
  189.         Debug.Print .ID3tag_Artist
  190.         Debug.Print .ID3tag_Comment
  191.         Debug.Print .ID3tag_Genre
  192.         Debug.Print .ID3tag_Title
  193.         Debug.Print .ID3tag_Year
  194.         
  195.         'changing the tag, changes will not occur until SaveTag is called
  196.         'these next two fields are different
  197.         'they cannot contain 30 characters, the other fields can.
  198.         .ID3tag_Year = 1999 'this one can contain 0000 to 9999
  199.         .ID3tag_Genre = GENRE_No_GENRE 'this one 0 to 255
  200.             
  201.         'max of 30 chars
  202.         .ID3tag_Comment = "limited to  30 chars12345678901234567890" 'will be cut off at 30 chars
  203.         .ID3tag_Title = "TagWriter Demo"
  204.         .ID3tag_Artist = "Thijmen klok"
  205.         'check at
  206.         .ID3tag_Album = "www.starting.com/timpysoft/"
  207.         'for updates.
  208.         'if i ask money for it, it will just be to cover my costs
  209.         'p.s., the very small mp3 file coming with this demo is _not_ a valid mp3 file
  210.         'tell to save the tag
  211.         l = .SaveTag() 'for now, this option will show a nag screen
  212.         
  213.         If l <> 0 Then
  214.             'usually the file is not there (err 53), or read-only (err 75)
  215.             MsgBox Error$(l) + " (" + mp3File, vbCritical + vbOKOnly
  216.         End If
  217.     End With
  218.     Unload Me
  219. End Sub
  220. Private Sub Form_Unload(Cancel As Integer)
  221.     End 'always put just one 'end' statement in any program, preferably in the unload event of the main form
  222. End Sub
  223.